package com.zzyl.controller.customer;

import com.zzyl.base.PageResponse;
import com.zzyl.base.ResponseResult;
import com.zzyl.dto.NursingProjectDto;
import com.zzyl.dto.UserLoginRequestDto;
import com.zzyl.service.MemberService;
import com.zzyl.service.NursingProjectService;
import com.zzyl.vo.LoginVo1;
import com.zzyl.vo.NursingProjectVo;
import com.zzyl.vo.PageBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: Insight
 * @Description: TODO
 * @Date: 2024/6/9 12:12
 * @Version: 1.0
 */
@RestController
@RequestMapping("/customer/orders/project")
public class CustomerProjectController {
    @Autowired
    NursingProjectService service;

    @GetMapping("/page")
    public ResponseResult<PageResponse<NursingProjectVo>> selectAll(NursingProjectDto dto) {
        PageResponse<NursingProjectVo> byPage = service.getByPage(dto);
        return ResponseResult.success(byPage);
    }

    @GetMapping("/{id}")
    public ResponseResult<NursingProjectVo> selectById(@PathVariable("id") Long id) {
        NursingProjectVo vo = service.selectById(id);
        return ResponseResult.success(vo);
    }
}
